System and method for the detection of de-interlacing of scaled video

ABSTRACT

A system, apparatus, and method are provided for a video detector that computes a measure of how much a given video content resembles one of a de-interlaced video content or a progressive video content. More particularly, the present invention determines the position of original and interpolated lines and the scaling factor of an input content whenever that content was scaled after de-interlacing.

The present invention relates to a system and method for a video detector that computes a measure of how much a given video content resembles one of a de-interlaced video content or a progressive video content. More particularly, the present invention determines the position of original and interpolated lines and the scaling factor of an input content whenever that content was scaled after de-interlacing.

Interlacing is widely used to reduce the bandwidth of video signals. It has become an integral part of PAL and NTSC standards and is included in some HD standards. The basic idea of interlacing is simple: by alternating the transmission of even and odd lines of consecutive frames, the resulting bandwidth is halved with respect to the original, so-called progressive, video signal.

The concept of de-interlacing, i.e. the reverse process in which the missing lines are restored, appeared with the first CRT displays with doubled vertical resolution and became an essential part of the inherently progressive flat panel displays. However, the quality of modern de-interlacers varies greatly. With the de-interlacer being typically located in the front of the video chain, any artifacts generated here will greatly affect algorithms in the back-end. Furthermore, with the video chain being split over various devices, it is typically not known to video processing algorithms whether or not the content was previously de-interlaced, and if so, what quality and/or artifacts to expect. In the case of external de-interlacers, such as, e.g., set-top boxes or DVD players with progressive output, such information is lost even to the front-end video processing.

Any knowledge on the type of video signal, i.e. de-interlaced or progressive, and the actual quality of the de-interlaced result is therefore highly desirable. Previous work has addressed the latter problem by proposing a no-reference metric for the quality of de-interlacing. However, the proposed algorithm was limited to very basic de-interlacing by line-insertion. In this invention, a simple and low-cost system and method is provided that is able to classify the input as de-interlaced or progressive for a broad range of de-interlacers without the need for a reference signal. Moreover, the current invention is robust for spatial scaling and therefore referred to as a DISC detector (De-Interlaced and SCaled) detector. The system and method of the present invention also indicate the positions of original and interpolated lines and the scaling factor.

The DISC detector can be used in a video chain as, e.g., as depicted in FIG. 1 to provide the control signal to the so-called video engine. However, many other possibilities for integrating the DISC detector exist. FIG. 1 illustrates only one such possibility.

The DISC detector of the present invention is based upon two simple observations:

a. Given the fact that interpolated lines are computed from original lines, their entropy is typically lower; and

b. The positions of original and interpolated lines are complementary and their positions alternate from frame to frame, i.e. their positions form a checkerboard pattern on the vertical-temporal plane.

The first observation can be illustrated by considering the de-interlaced output of a mainstream de-interlacer. If one separates the de-interlaced output into two images, one consisting of the original lines and one consisting of the interpolated lines, then one can clearly observe that the second image is more blurred, i.e., even and odd lines in the imperfectly de-interlaced frames have different high-frequency statistics. Hence, certain discriminating functions should exist that can discriminate between original and interpolated lines. For example, the following function computed on the positions original lines gives, in general higher values than on interpolated lines

D(y,n)=D ₁(y,n)+c ₁ *D ₂(y,n)+c ₂ *D ₃(y,n),

where

${{D_{1}\left( {y,n} \right)} = {\frac{1}{w}{\sum\limits_{x}\; {{{F\left( {x,y,n} \right)} - {F\left( {x,{y - 2},n} \right)}}}}}},{{D_{2}\left( {y,n} \right)} = {\frac{1}{w}{\sum\limits_{x}\; {{{F\left( {x,y,n} \right)} - {F\left( {x,{y - 1},n} \right)}}}}}},{{D_{3}\left( {y,n} \right)} = {\frac{1}{w}{\sum\limits_{x}\; {{{F\left( {x,y,n} \right)} - {F\left( {x,y,{n - 1}} \right)}}}}}},$

and where c₁ and c₂ are some parameters.

Experimental validation shows that D(y, n) gives consistently higher values on original lines of de-interlaced content and therefore using the following measure of de-interlacing quality is suggested:

${M = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}\; {{D\left( {y,n} \right)} \cdot \left( {- 1} \right)^{({y + n})}}}}}},$

where S is some sub-grid of vertical-temporal pixel grid such that S contains the equal number of points from odd and even grids.

The measure is now generalized to scaled video signals as follows. If the video is de-interlaced and scaled factor p then for any a sufficiently close to β, D(y,n) as the function of y, should contain essential amount of the highest spatial-temporal harmonic

g(α,y,n)=c _(α) exp(iπ(α·y+n)),

where c_(α) is the amplitude coefficient which depends on the cropping method (if the video was cropped after scaling) and the visibility of de-interlacing artifacts. In order to find the scaling ratio c_(α) of de-interlaced video we evaluate the amplitude of the scaling spectrum ρ(α)

${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}\; {{D\left( {y,n} \right)} \cdot {\exp \left( {{- }\; {\pi \left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$

for a given set/interval of candidate α where S is some sub-grid of vertical-temporal pixel grid such that S contains the equal number of points from odd and even grids. In another alternative exemplary embodiment the discrimination between de-interlaced and progressive video can be made on the basis of variance σ and the absolute maximum M of the power spectrum ρ(α). If the video is de-interlaced and scaled with factor β then the scaling spectrum ρ(α) as function of a should have a well pronounced peak at α=β, and hence σ is small and M is high. For originally progressive sequences, the spectrum is flat, and therefore σ is large and M is relatively low, as illustrated in FIG. 6.

Based on these experimental results, we propose the following discriminating measure

DISC_(μ)=(1+(10^(−3.35)*σ⁴ /M)²)⁻¹,

which represents deviations from the discriminating line on FIG. 2? The measure takes values in [0, 0.5] for 96% of tested progressive frames, and values in (0.5, 1] for 94% of de-interlaced frames providing quite robust classification.

The provided DISC detector has been successfully tested in a number of video processing applications. Some of them are described below, though the list is not exhaustive:

1) Film cadence detection. In film cadence detection, it is essential to identify the presence and location of repeated frames. Unfortunately, due to poor de-interlacing, repeated frames can differ with respect to each other. Together with compression artifacts, this makes film detection quite a challenging task. Since the DISC value indicates the amount of de-interlacing artifacts, it can be used to determine how much frame difference can be tolerated to classify two de-interlaced frames as a repeat.

2) Sharpness enhancement control. If a sharpness enhancement algorithm is applied to a video with visible de-interlacing artifacts, it clearly increases the sharpness of the artifacts as well. Since the DISC value correlates with visibility of de-interlacing artifacts, it can be used to adjust the parameters of sharpness enhancement algorithms.

3) Post-processing of film content. For poorly de-interlaced film content, improve the quality can be improved by re-de-interlacing. Since the DISC detector provides the positions of original lines, repeated frames can be improved by line-wise averaging of them with weights proportional to the proximity to original lines in respective frames. Although scaling prevents a perfect reconstruction of the film content, experiments have shown significant improvements in the case of up-scaled video content due to overscan;

4) Quality evaluation. Since the DISC value correlates with visibility of de-interlacing artifacts, it can be used for comparison of different de-interlacing techniques and for quality evaluation of particular de-interlacers, see FIG. 7;

The detector can be used in various applications and such as other interesting applications that are possible include:

5) Re-(de)-interlacing. Suppose the front end receives a video in progressive format and has a good de-interlacer on board. It is possible to tune the DISC detector such that it can robustly identify whether the video is occasionally de-interlaced with pure line insertion or pure line repetition. Then if there is no scaling detected, it is possible to interlace video (select original lines) and re-de-interlace it with the de-interlacer of the present invention.

6) Video compression. The DISC detector can be used to select the optimal compression strategy. For example, if the video is poorly de-interlaced, at least one of a higher compression ratios and extra quality can be achieved if it is compressed as interlaced video. Note that proper re-interlacing is only possible for non-scaled video, as it requires the positions of original and interpolated lines to be located on an integer grid.

Many of the attendant features will be more readily appreciated by referring to the following detailed description considered in connection with the accompanying drawings.

FIG. 1 is an example usage of the DISC detector according to the present invention in a conventional video chain; and

FIG. 2 illustrate characteristics of a spectra for 60 video sequences each of ˜100 frames scaled by a factor of 0.96, the light gray points correspond to 30 sequences de-interlaced with a state-of-the-art de-interlacer, the dark gray points to 30 originally progressive sequences, and the line log(y)=2 log(x)−3.35 efficiently discriminates between de-interlaced and progressive content since only 4% of progressive, and 6% if de-interlaces frames are misclassified;

FIG. 3 is an example frame from a de-interlaced sequence a) and enlarged parts of it consisting of b) original lines only, and c) restored lines only. Clearly visible is that c) is substantially more blurred than b);

FIG. 4 illustrates an example of a table of scaling interval and corresponding discrimination functions defined on an integer grid.

FIG. 5 is an example of a sample of D1(y, n) computed on first 80 lines of a de-interlaced image. D1(y, n) computed on original lines gives, in general, positive values while D1(y, n) computed on interpolated lines gives in general, negative values;

FIG. 6 is an example of two scaling spectra of a sample frame sequence, scaled with ratio 1.05. where top: de-interlaced with a state-of-the-art de-interlacer; bottom: original progressive and the top spectrum is very narrow, the dominant frequency has large amplitude (≈1900 against ≈10, the maximal amplitude of the spectrum of original progressive frame), and it correspond to the scaling ratio 1.05;

FIG. 7 illustrates an example of quality comparison of different de-interlacers: a) line average with DISC value>0.9, b) a motion compensative de-interlacer with DISC value of 0.5, and c) the progressive original with DISC value<0.3 and it can be seen that in this case DISC value correlates with the visibility of de-interlacing artifacts;

FIG. 8 a illustrates an example of original sequences in a) 2:2 film cadence with two segments indicated, and b) 3:2 film cadence with one segment;

FIG. 8 b illustrates an example of the processing in the columns is a) de-interlacing using a motion adaptive de-interlacer and subsequent scaling, b) frames are averaged with their repeats, eliminating most of the detail flicker, c) (re)-de-interlacing using the DISC detector and d) the original progressive sequence;

FIG. 9 illustrates an example of an apparatus for the detection of de-interlaced vides, according to a first embodiment of the present invention.

A low-cost detector and detection method are provided that can classify video in progressive format as being de-interlaced or originally progressive. Experiments have confirmed the robustness of the detector and method of the present invention in discriminating between de-interlaced and progressive content, as well as its added value in the described applications.

A low-cost detector and detection method are provided that can classify video in progressive format as being de-interlaced or originally progressive. Experiments have confirmed the robustness of the detector and method of the present invention in discriminating between de-interlaced and progressive content, as well as its added value in the described applications.

Interlacing is widely used to reduce the bandwidth of video signals. It has become an integral part of PAL and NTSC standards and is included in some HD standards. The basic idea of interlacing is simple: by alternating the transmission of even and odd lines of consecutive frames, the resulting bandwidth is halved with respect to the original, so-called progressive, video signal.

The concept of de-interlacing, i.e. the reverse process in which the missing lines are restored, appeared with the first CRT displays with doubled vertical resolution and became an essential part of the inherently progressive flat panel displays. Basically, de-interlacing algorithms recreate missing lines from their existing spatial and/or temporal neighbors:

F ₀(x,y,n)=F _(i)(x,y,n), ((y+n)mod2=0

F(x,y,n), otherwise   (1)

with F(x, y, n) being the pixels at spatial position (x, y), field number n existing only on vertical positions ((y+n) mod 2=0), and F_(i)(x, y, n) being the interpolated pixels. In general, de-interlacing is a particularly efficient way of increasing the spatial resolution of video, as advanced de-interlacers are able to double the vertical resolution of the video signal by recovering the original information.

However, the quality of modern de-interlacers varies greatly. With the de-interlacer being typically located in the front of the video chain, any artifacts generated here will greatly affect algorithms in the rest of the video chain. Furthermore, with the video chain being split over various devices and/or IC's, it is typically not known for video processing algorithms if the content was previously de-interlaced, and if so, what quality and/or artifacts to expect. In the case of external de-interlacers, such as e.g. set-top boxes or DVD players with progressive output, such information is lost even to the front-end video processing.

Any knowledge on the type of video signal, i.e. de-interlaced or progressive, and the actual quality of the de-interlaced result is therefore highly desirable. The present invention provides a low-cost system and method which is able to classify the input as de-interlaced or progressive for a broad range of de-interlacers without the need for a reference signal. Moreover, this algorithm is robust for spatial scaling and therefore referred to as DISC detector (De-Interlaced and SCaled). Furthermore, it can indicate the position of original and interpolated lines and the scaling factor.

In the following detailed disclosure the detector is first described followed by a discussion of its results. Possible application areas are then presented.

Based on the observation that de-interlacing quality has a large impact on the overall quality of the video chain, it becomes apparent that a detector is desirable that indicates how much a given video signal resembles true progressive video content. If it is also assumed that higher de-interlacing quality results in a higher resemblance of the de-interlaced signal to the original progressive signal, such a detector would not only allow for the differentiation of progressive and de-interlaced content, but also automatically give an indication on the quality of the de-interlacing.

It seems most obvious to base such a detector upon the calculation of the Mean Square Error (MSE) between a given de-interlaced video signal and an original progressive video signal. However, such a detector is unsuitable for real-time applications, as the calculation of the MSE requires a reference video signal. By contrast, a no-reference detector does not require any original reference, and can therefore be included in a real-time system. This enables the usage of the detector in video chains as, e.g., depicted in FIG. 1, where the output of the detector is used in the so-called video engine.

The DISC detector which is described in the following sections, is a no-reference detector that is based upon two simple observations:

1. Given the fact that interpolated lines are computed from original lines, their entropy is typically lower.

2. The positions of original and interpolated lines are complementary and their positions alternate from frame to frame, i.e. their positions form a checkerboard pattern on the vertical-temporal plane.

The former observation is based upon the fact that interpolated lines are computed from the original lines according to the de-interlacing algorithm, and therefore basically contain less information. This means that the interpolated pixels should be, in general, more correlated with their neighbors than the original pixels, and hence, the statistical characteristics of the interpolated pixel grid should, in general, differ from the statistical characteristics of the original grid. Moreover, the larger this difference is, the higher the chance that de-interlacing artifacts become visible. On the other hand, in originally progressive video signals, there should be no noticeable statistical difference between even and odd grids.

The latter observation suggests to divide all lines of a video sequence in two vertical-temporal grids, one so-called even grid {(y, n)|(y+n) mod 2=0}, where y is the line number and n is the frame, is the grid of original lines, and the complementary odd grid {(y, n)|(y+n) mod 2=1}. If the positions of original lines fall on the even grid, then the positions of interpolated lines fall on odd grid, and visa versa, if the even grid is the grid of interpolated lines then the odd grid is the grid of original lines. The above observations lead to the following conclusion: if a discriminating function exists such that the average of this function computed on the even grid differs significantly from the average of this function computed on then odd grid, then the video is de-interlaced with a high probability. Furthermore, the larger this difference is, the higher the chance that de-interlacing artifacts become visible.

The above concept can be illustrated by considering the de-interlaced output of a mid-range de-interlacer as shown in FIG. 3. If one separates the de-interlaced output into two images, one consisting of the original lines and one consisting of the interpolated lines, then one can clearly observe that the second image is more blurred, i.e. even and odd lines in the imperfectly de-interlaced frames have different high-frequency statistics.

The simplest discriminating function which can capture the differences depicted in FIG. 3 is in essence a vertical high-pass filter as defined by:

${{D\left( {y,n} \right)} = {\frac{1}{w}{\sum\limits_{x}\; {{{F_{0}\left( {x,y,n} \right)} - {F_{0}\left( {x,{y - 2},n} \right)}}}}}},$

where w is the image width. However, the following modification results in a higher contrast or differentiation

${D_{1}\left( {y,n} \right)} = {\frac{L}{w}{\sum\limits_{x \in {L \cdot N_{o}}}\; \left( {{{sign}\left( {\Delta_{{- 2},0}\left( {x,y,n} \right)} \right)} - {{sign}\left( {\Delta_{{- 2},0}\left( {x,{y + 1},n} \right)} \right)}} \right)}}$

where w is the image width; in x ε L • N₀ we take x=0, L, 2 L, 3 L , . . . ; sign(z) is the sign function:

${{sign}(z)} = \left\{ \begin{matrix} {1,} & {{z > 0},} \\ {0,} & {{z = 0},} \\ {{- 1},} & {{z < 0},} \end{matrix} \right.$

and Δ_(a,b)(x, y, n) is the local difference defined as:

${{\Delta_{a,b}\left( {x,y,n} \right)} = {\frac{1}{L}{\sum\limits_{j = 0}^{L - 1}\; {{{F_{0}\left( {{x + j},y,n} \right)} - {F_{0}\left( {{x + j},{y + a},{n + b}} \right)}}}}}},$

where L is experimentally derived as 3.

One can see that D₁(y,n) is indeed derived from D(y,n) since D₁(y,n) is a normalized difference between Δ_(−2,0)(x,•,n) computed on current line (y,n) and the line below (y+1,n), and since Δ_(−2,0)(x,y,n) is the localized version of D(y,n) around horizontal position y. So we see that on original lines Δ_(−2,0)(x,•,n) is, in general, larger, and hence D₁(y,n) is positive, while on interpolated lines Δ_(−2,0)(x,•,n) is, in general, smaller, and hence D₁(y,n) is negative. This is illustrated in FIG. 5, which shows a sample of D₁(y,n) computed on the first 80 lines of a de-interlaced image. Small vertical details in the image, however, can cause deviations from this rule.

From a practical point of view, D₁(y,n) efficiently discriminates between the original and interpolated grids for the majority of de-interlacers. However, two rather primitive de-interlacers form the exception to this rule, as here the original and interpolated lines are identical modulo a spatial temporal shift:

1. Pure line insertion. In this de-interlacing method, the interpolated lines are copies of the lines with an identical vertical position in the previous image. For example, if the even grid is the original grid, then the interpolated samples in Equation (1) are defined by:

F _(i)(x, y, n)=F(x, y, n−1), (y, n) in odd grid.

Since the two pixel grids, one consisting of even lines the other of odd lines, consist both of original lines (from different frames), the discriminating function D₁(y,n) cannot discriminate them. However, the following discriminating function matches this de-interlacing method better:

${D_{2}\left( {y,n} \right)} = {\frac{{\sum\limits_{x \in {L \cdot N_{o}}}\; {\Delta_{0,{- 1}}\left( {x,y,n} \right)}} + ɛ}{{\sum\limits_{x \in {L \cdot N_{o}}}\; \left( {{\Delta_{0,{- 1}}\left( {x,y,n} \right)} + {\sum\limits_{x \in {L \cdot N_{o}}}\; {\Delta_{0,{- 1}}\left( {x,{y + 1},n} \right)}}} \right)} + {2 \cdot ɛ}} - {0.5.}}$

Indeed, since Δ_(0,−1)(x,y,n) is zero, (or almost zero, depending on noise) on the interpolated grid D₂(y,n) is, in general, negative on the interpolated grid. On the other hand, on the original grid, D₂(y,n) is positive and proportional to inter-frame difference. Hence, if two consecutive frames are locally different, i.e. resulting in egg-slicing artifacts, then the averaging of D₂(y,n) on the even grid differs severely from the averaging on the odd grid. In this case, the grid with the positive average is the original grid.

2. Pure line repetition. In this de-interlacing method, the interpolated lines are copies of the original lines above them. For example, if the even grid is the original grid, then the interpolated samples in Equation (1) are defined by:

F _(i)(x, y, n)=F(x, y−1, n), (y, n) in odd grid.

Again, the discriminating function D₁(y,n) cannot discriminate between the odd and even pixel grid. Moreover, D₂(y,n) represents the local variation in the distance between the original lines of current and of previous frames, and hence can neither help in discriminating between original and interpolated lines. The proper discriminating function for the line repetition de-interlacer is:

${D_{3}\left( {y,n} \right)} = {\frac{{\sum\limits_{x \in {L \cdot N_{o}}}\; {\Delta_{{- 1},0}\left( {x,y,n} \right)}} + ɛ}{{\sum\limits_{x \in {L \cdot N_{o}}}\; \left( {{\Delta_{{- 1},0}\left( {x,y,n} \right)} + {\sum\limits_{x \in {L \cdot N_{o}}}\; {\Delta_{1,0}\left( {x,y,n} \right)}}} \right)} + {2 \cdot ɛ}} - {0.5.}}$

Observe that Δ_(−1,0)(x,y,n) is zero (or almost zero, depending on noise) on the interpolated grid, and hence again D₂(y,n) is, in general, negative on the interpolated. On the original grid, Δ_(−1,0)(x,y,n) is positive and proportional to amount of high frequent detail in the image. Hence, if the frame is not completely homogeneous and stair-casing artifacts due to line repetition can be observed, then the averaging of this discriminating function on the original grid is positive and negative on the interpolated grid.

The individual discriminating functions can be combined into a combined discriminating function to cover a wide range of possible de-interlacing algorithms by the following summation:

${{D\left( {y,n} \right)} = {\sum\limits_{i}\; {\kappa_{i}{D_{i}\left( {y,n} \right)}}}},$

where κ_(i) are mixing parameters. In practice, some contributions to D_(i)(y, n) give, in general, higher values on the original grid, and the remaining D_(i)(y, n) contribute as noise. The following experimentally derived values are provided: κ₁=1 and κ₂, κ₃ small enough, (e.g., κ₂=κ₃=0.2) to balance the inference between D_(i)(y, n). Indeed, one can see that D₂(y,n) and D₃(y, n) are more efficient than D₁(y,n) on the respectively de-interlaced content. Hence, if the video is de-interlaced with pure line-repetition or pure line-insertion, then, due to the efficiency of D₂(y,n) and D₃(y,n), we can achieve a high SNR even for small κ₂ and κ₃. If the video is de-interlaced with other methods, then D₂(y,n) and D₃(y,n) do not contribute much to noise due to the low κ₂ and κ₃.

It should be noted that both pure line insert and pure line repeat de-interlacers are quite rarely used since they produce highly visible artifacts in case of motion and vertical detail, respectively. Furthermore, motion adaptive de-interlacers, which combine line insert and line repeat depending on the detected motion, can be already be effectively detected with the discriminating function D₁(y,n). This indeed justifies the above proposed values for κ_(i).

Note that the implementation of D₁(y,n) requires two line memories, D₂(y,n) requires one frame memory, and D₃(y,n) one line memory. Hence, to limit the implementation cost of the detector of the present invention, one could implement the present invention based purely on D₁(y,n), or D₁(y,n) and D₃(y,n).

Since the average of D(y, n) computed on the even grid differs significantly from the average of this function computed on then odd grid we suggest you use the following measure of de-interlacing quality

${M = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}\; {{D\left( {y,n} \right)} \cdot \left( {- 1} \right)^{({y + n})}}}}}},$

where S is some sub-grid of vertical-temporal pixel grid such that S contains the equal number of points from odd and even grids. The formula above returns one number for a given video sequence. For streaming applications it makes sense to compute the de-interlacing quality measure recursively as

${M_{n + 1} = {{{\left( {1 - ɛ} \right) \cdot M_{n}} + {{ɛ \cdot {S_{n + 1}}^{- 1}}{\sum\limits_{{({y,n})} \in S_{n + 1}}\; {{D\left( {y,n} \right)} \cdot \left( {- 1} \right)^{({y + n})}}}}}}},$

where S_(n) is some sub-grid of the current frame and ε ∈(0,1] is the temporal consistency parameter. If ε is set close to one then M_(n) indicates only the quality measure for current frame, if ε is smaller than one, M_(n) also takes previous frames into account.

The invention is generalized to scaled video signals as follows. Due to the scaling, the difference between the original and progressive lines changes. Therefore, the scaling should be adjusted to the discrimination functions D_(i)(y,n). In order to do this, for scaling factor α, we replace Δ_(a,b)(x,y,n) in D_(i)(y,n) by its scaled analog Δ_(α·a,b)(x,y,n) where interpolation is used to obtain image values at the non-integer positions. The discriminating functions D₁(y,n), D₂(y,n) and D₃(y,n) become

${{D_{1,\alpha}\left( {y,\; n} \right)} = {\frac{L}{w}{\sum\limits_{x \in {L \cdot N_{o}}}\begin{pmatrix} {{{sign}\left( {\Delta_{{{- 2} \cdot \alpha},0}\left( {x,y,n} \right)} \right)} -} \\ {{sign}\left( {\Delta_{{{- 2} \cdot \alpha},0}\left( {x,{y + 1},n} \right)} \right)} \end{pmatrix}}}},{{D_{2,\alpha}\left( {y,n} \right)} = {\frac{{\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{0,{- 1}}\left( {x,y,n} \right)}} + ɛ}{{\sum\limits_{x \in {L \cdot N_{o}}}\begin{pmatrix} {{\Delta_{0,{- 1}}\left( {x,y,n} \right)} +} \\ {\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{0,{- 1}}\left( {x,{y + \alpha},n} \right)}} \end{pmatrix}} + {2 \cdot ɛ}} - 0.5}},{{D_{3,\alpha}\left( {y,n} \right)} = {\frac{{\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{{- \alpha},0}\left( {x,y,n} \right)}} + ɛ}{{\sum\limits_{x \in {L \cdot N_{o}}}\begin{pmatrix} {{\Delta_{{- \alpha},0}\left( {x,y,n} \right)} +} \\ {\sum\limits_{x \in {L \cdot N_{o}}}{\Delta_{\alpha,0}\left( {x,y,n} \right)}} \end{pmatrix}} + {2 \cdot ɛ}} - {0.5.}}}$

Observe that the video vertically scaled with coefficient β can be detected by discriminating functions D_(i,α)(y,n), if α is sufficiently close to β. This allows us to use only discriminating functions D_(i,α)(y,n) defined on integer grid. For practical purposes, it is sufficient to consider a corresponding to 0%-7% overscan for SD material, and the overscan combined with possible up-scaling from 576p/480p/720p to 720p/1080p lines for HD material. This provides the following intervals of interest for α. It is [1.0, 1.07] for SD, [1.0, 1.07], [1.25, 1.34] and [1.5, 1.61] for 720p, and [1.0, 1.07], [1.5, 1.61], [1.87, 2.01] and [2.25, 2.41] for 1080p. Since for any α discriminating functions (8) are allowed to take image values at the nearest integer positions without much loss in robustness, for every interval of interest, there can be found a fixed set of most suitable discriminating functions. The discriminating functions corresponding to above intervals of a are given in Table 1 shown in FIG. 4. The discriminating functions defined above work best for any α≧1. However, for vertically downscaled videos with factor α<1, due to the merging of original and interpolated grids, these functions become less effective. If α<0.95 then D_(1,α)(y,n) is replaced by its more efficient temporal analog D_(1,60)′(y,n) (though it is less efficient for α>0.95)

${D_{1,\alpha}^{\prime}\left( {y,\; n} \right)} = {\frac{L}{w}{\sum\limits_{x \in {L \cdot N_{o}}}\begin{pmatrix} {{{sign}\left( {\Delta_{{{- 2} \cdot \alpha},0}\left( {x,y,n} \right)} \right)} -} \\ {{sign}\left( {\Delta_{{{- 2} \cdot \alpha},0}\left( {x,y,{n - 1}} \right)} \right)} \end{pmatrix}}}$

As before, the sum is analyzed

${{D_{\alpha}\left( {y,n} \right)} = {\sum\limits_{i}{\kappa_{i}{D_{i,\alpha}\left( {y,n} \right)}}}},$

where D_(2,α)(y, n) can be excluded without substantially sacrificing detection quality.

If the video is de-interlaced and scaled factor β then for any α sufficiently close to β, D_(α)(y,n) as the function of y, should contain essential amount of the highest spatial-temporal harmonic

g(α,y,n)=c _(α) exp(iπ(α·y+n)),

where c_(α) is the amplitude coefficient which depends on the cropping method (if the video was cropped after scaling) and the visibility of de-interlacing artifacts.

In order to find the scaling ratio c_(α) of de-interlaced video we evaluate the amplitude of the scaling spectrum ρ(α)

${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {{- }\; {\pi \left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$

for a given set/interval of candidate α where s is some sub-grid of vertical-temporal pixel grid such that S contains the equal number of points from odd and even grids.

If the video is de-interlaced and scaled factor β then the scaling spectrum ρ(α) as function of α should have a well pronounced peak at α=β.

FIG. 6 illustrates the amplitude of two scaling spectra of a sample video frame scaled with ratio 1.05. The top sequence is de-interlaced with an advanced de-interlacer; the bottom is original progressive. The first spectrum is very narrow, the dominating frequency has significant amplitude, and it corresponds to the scaling ratio.

FIG. 6 suggests discriminating de-interlaced and progressive spectra based on the amplitude of dominating frequency

${{Max} = {\max\limits_{\alpha}\; {\rho (\alpha)}}},$

and the spectrum variance

${{Var} = \sqrt{{\frac{1}{\left\{ \alpha \right\} }{\sum\limits_{\{\alpha\}}\left( {\rho (\alpha)} \right)^{2}}} - \left( {\frac{1}{\left\{ \alpha \right\} }{\sum\limits_{\{\alpha\}}{\rho (\alpha)}}} \right)^{2}}},$

where {α} is the set/interval of candidate scaling factors, |{α}| is the total number of frequencies in this set/interval. FIG. 2 is a plot on loglog scale (maximum, variance) of points for a number of video frames samples from different sequences and scaled with ratio 0.96. The top points correspond to de-interlaced sequences, and the bottom points to original progressive. Points are grouped in two distinct sets which can be efficiently separated by line

log(Max)=c ₁∩log(Var)+c ₂,

or by

Max=e ^(c) ₂ (Var)^(c) ¹ ,

on normal scale where c₁ and c₂ are come parameters. The video is classified as progressive if

Max<e ^(c) ² (Var)c ¹,

otherwise video is classified as de-interlaced and scaled with factor

$\hat{\beta} = {\underset{\alpha}{\arg \; \max}{{\rho (\alpha)}.}}$

The proximity with the discriminating line Max=e^(c) ² (Var)^(c) ¹ , can be converted to a so-called de-interlaced and scaled (DISC) measure

${M_{DISC} = \frac{{Max} \cdot ({Var})^{- c_{1}}}{^{c_{2}} + {{Max} \cdot ({Var})^{- c_{1}}}}},$

which takes values close to 0 on progressive video, values close to one on de-interlaced videos, and ≈0.5 on the discriminating line.

The positions corresponding to original lines in the scaled content can be determined as maxima of

cos(π(β γ+n)+φ(β)),

i.e.

${y_{k} = {\frac{1}{\beta}\left( {{2\; k} - \frac{\phi (\beta)}{\pi} - n} \right)}},{k = 0},1,{2\mspace{14mu} \ldots}$

where φ(β) is the phase of the scaling spectrum

${\phi (\beta)} = {{\arg\left( {{S}^{- 1}{\sum\limits_{{({y,n})} \in S}{{D_{\beta}\left( {y,n} \right)} \cdot {\exp \left( {{- }\; {\pi \left( {{\beta \cdot y} + n} \right)}} \right)}}}} \right)}.}$

The detection method described above has natural limitations. First it is not very robust for scaling factors below 0.95. Second, if the method can detect the presence of de-interlacing and scaling, it cannot discriminate between the scaling with ratio β=1+ε and ratio β=1−ε. Indeed, since

g(1+ε,y,n)=c _(α) exp(iπ(1+ε)·y+n))=−c _(α) exp(iπ((1−ε)·y+n))=−g(1−ε,y,n),

appearance of the same spatial-temporal harmonic in D_(β)(y,n) (differences in phase are not discriminated which can be caused by cropping or different phase of interlacing). If the same discriminating function D_(α)(y,n) is used for α≈1 then the scaling spectrum ρ(α) is also symmetric around α≈1.

$\begin{matrix} {{\rho \left( {1 + ɛ} \right)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{1 + ɛ}\left( {y,n} \right)} \cdot {\exp \left( {{- }\; {\pi \left( {{\left( {1 + ɛ} \right) \cdot y} + n} \right)}} \right)}}}}}} \\ {= {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{{D_{1 + ɛ}\left( {y,n} \right)} \cdot \left( {- 1} \right)^{n + y}}{\exp \left( {{- }\; \pi \; ɛ\; y} \right)}}}}}} \\ {= {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{{D_{1 - ɛ}\left( {y,n} \right)} \cdot \left( {- 1} \right)^{n + y}}{\exp \left( {\; \pi \; ɛ\; y} \right)}}}}}} \\ {= {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{1 - ɛ}\left( {y,n} \right)} \cdot {\exp \left( {{- }\; {\pi \left( {{\left( {1 + ɛ} \right) \cdot y} + n} \right)}} \right)}}}}}} \\ {= {{\rho \left( {1 - ɛ} \right)}.}} \end{matrix}$

Below, the most straightforward applications of the DISC detector are discussed. This list in not exhaustive, however, and other interesting applications may still exist.

1) Quality evaluation. Since the DISC value correlates with visibility of de-interlacing artifacts, it can be used for comparison of different de-interlacing techniques and for quality evaluation of particular de-interlacers, see FIG. 7;

2) Video compression. The DISC detector can be used to select the optimal compression strategy. For example, if the video is poorly de-interlaced, at least one of a higher compression ratio and extra quality can be achieved if it is compressed as interlaced video. Note that proper re-interlacing is only possible for non-scaled video, as it requires the positions of original and interpolated lines to be located on an integer grid;

3) Film cadence detection. In film cadence detection, it is essential to identify the presence and location of repeated frames. Unfortunately, due to poor de-interlacing, repeated frames can differ with respect to each other. Together with compression artifacts, this makes film detection quite a challenging task. Since the DISC value indicates the amount of de-interlacing artifacts, it can be used to determine how much frame difference can be tolerated to classify two de-interlaced frames as a repeat.

4) Sharpness enhancement control. If a sharpness enhancement algorithm is applied to a video with visible de-interlacing artifacts, it clearly increases the sharpness of the artifacts as well. Since the DISC value correlates with visibility of de-interlacing artifacts, it can be used to adjust the parameters of sharpness enhancement algorithms. Furthermore, since the locations of the original and interpolated pixels are known, the algorithm can be altered to apply more sharpness enhancement on the original lines and less on the interpolated lines.

5) Re-(de)-interlacing. Suppose the front end receives a video in progressive format and has a good de-interlacer on board. It is possible to tune the DISC detector such that it can robustly identify whether the video is occasionally de-interlaced with pure line insertion or pure line repetition. Then if there is no scaling detected, it is possible to interlace video (select original lines) and re-de-interlace it with the de-interlacer of the present invention.

6) Post-processing of film content. The DISC detector is especially efficient in combination with film detector. The film detector alone already provides an excellent opportunity for temporal post-filtering of poorly de-interlaced and scaled film content. If n frames are classified as n copies of one original film frame, subject compression and de-interlacing artifacts, each of these n frames can be replaced by the pixel-wise average of these frames. This simple operation removes the most annoying detail flicker and restores some high frequencies lost in individual de-interlaced frames. However the output is still not as sharp as the original. The usage DISC detector in combination with film detector can give us further improvements since it is possible to determine the approximate positions the original lines. Due to possible scaling some of the output lines fall on the original lines, and some fall in-between. The idea is to bias the pixel-wise average of repeats towards the original lines so that the distribution of weights becomes dependent on parity and the vertical position of the current frame. Hence, at vertical positions where the output pixels fall on the original lines perfect reconstruction is possible. In this case the weights are concentrated either on odd or on even frame repeats depending on which contain the original line, i.e., the re-de-interlacing is actually done. If there is no scaling and at least one repeat then the perfect reconstruction is possible for the whole frame. If there is scaling and the output pixels fall precisely in-between two original lines then we assign equal weights in the pixel-wise average as the best possible solution. Hence, in the case of scaling when the output lines periodically fall on and in-between the original lines improvement over the flat pixel-wise average is also periodically changes with vertical positions. However this periodicity being static does not disturb the perception of the general quality improvement. FIGS. 8 a and 8 b illustrate the advantages of re-de-interlacing over the flat pixel-wise average of the detected frame repeats.

FIG. 9 illustrates an example of an apparatus that comprises modules that perform:

-   -   a) Discrimination Function Module (901): evaluation of so-called         discriminating function D(y,n) for given set of lines (y,n)∈ S         where discriminating function D(y,n) is based on local spatial         and/or temporal pixel correlations;     -   b) Grid Determination Module (902): determination of an even         grid to consist of the lines with line number y in frames with         frame number n where sum y+n is even number and an odd grid to         consist of the lines with line number y in frames with frame         number n where sum y+n is odd     -   c) Averaging Module (903) computation of an average A1 of         discriminating function D(y,n) on subset of pixels belonging to         even grind and an average A2 of discriminating function D(y,n)         on subset of pixels belonging to odd grid where the even grid         consist of the lines with line number y in frames with frame         number n where sum y+n is even number and the odd grid consist         of the lines with line number y in frames with frame number n         where sum y+n is odd.     -   d) Comparison/classification Module (904): Comparison of the         averages A1 and A2 and based on their difference computing and         outputting a de-interlacing quality measure; and classifying the         even grid as the grid of original lines if A1>A2, otherwise         classifies odd grid as grid of original lines.

While various embodiments herein have been discussed with reference to DISC, these are exemplary and for illustrative purposes only. The general concepts of DISC can be realized with equivalent component. Furthermore, the DISC can be implemented using hardware, software or a combination thereof. The variety of devices that can benefit from DISC are too numerous to fully elaborate but include those mentioned in the above disclosure, at a minimum, as well as Blue Ray players, DVD players, televisions and displays, personal computers, portable video players, codecs, etc. Therefore, it will be appreciated by one skilled in the art that various changes can be made to the DISC disclosed herein without departing from the spirit and scope of the invention as defined by the appended claims and their equivalents. 

1. A method for detection of de-interlacing, comprising: providing a set of lines (y,n)∈ S and a discriminating function D(y,n) for the provided set, where n is a specific frame number and y is a line number within the specified frame; defining an odd grid as a subset of pixels to consist of lines (y,n)∈ S with line number y in frames with frame number n where sum y+n is odd and defining an even grid to consist of lines (y,n)∈ S with line number y in frames with frame number n where sum y+n is even; evaluating a pre-set discriminating function D(y,n) for each of the lines (y,n)∈ S; computing an average A1 of the evaluated discriminating function D(y,n) on a subset of pixels belonging to the even grid and average A2 of the evaluated discriminating function D(y,n) on a subset of pixels belonging to odd grid; computing a de-interlacing quality measure based on the difference between A1 and A2; and classifying the even grid as the grid of original lines if A1>A2, otherwise classifying the odd grid as the grid of original lines.
 2. The method of claim 1 wherein where the pre-set discriminating function D(y,n) is based on one of local spatial, temporal pixel correlations, and local spatial and temporal pixel correlations.
 3. The method of claim 1 wherein where the pre-set discriminating function D(y,n) is based on a weighted sum of different specific discriminating functions.
 4. The method of claim 1 wherein the pre-set discriminating function D(y,n) further comprises at least one of specific discriminating function proportional to a relative/additional amount of high frequency detail in the given line with respect to a specific neighboring line in an analyzed previous or next frame.
 5. An apparatus for detection of de-interlacing, comprising: a module that performs a pre-set discriminating function D(y,n) on a subset of the set of lines (y,n)∈ S where n is a specific frame number and y is a line number within the specified frame, a grid determination module that defines an odd grid as a subset of pixels consisting of lines (y,n)∈ S with line number y in frames with frame number n where sum y+n is odd and defining an even grid as a subset of pixels consisting of lines (y,n)∈ S with line number y in frames with frame number n where sum y+n is even; an averaging module that computes an average A1 by executing the discriminating function D(y,n) on the pixels belonging to the even grid and average A2 by executing the discriminating function D(y,n) on a the pixels belonging to the odd grid; a comparison module that outputs a de-interlacing quality measure based on a comparison between the values A1 and A2; and a classification module that classifies the even grid as the grid of original lines if A1>A2, and otherwise classifies the odd grid as the grid of original lines.
 6. The apparatus of claim 5 wherein the pre-set discriminating function D(y,n) is based on a weighted sum of different specific discriminating functions.
 7. The apparatus of claim 5 wherein the pre-set discriminating function D(y,n) is based on one of local spatial, temporal pixel correlations, and local spatial and temporal pixel correlations.
 8. The apparatus of claim 5 wherein the pre-set discriminating function D(y,n) further comprises at least one of specific discriminating function proportional to a relative/additional amount of high frequency detail in the given line with respect to a specific neighboring line in an analyzed previous or next frame.
 9. A method for detecting de-interlacing for scaled video, comprising: for every scaling ratio α of a given set α ∈ I computing a measure, ρ(α) which indicates the visibility of de-interlacing artifacts given that the content was scaled with vertical factor α, by performing the following: a. evaluating a pre-set discriminating function D_(α)(y,n) for a given set of lines (y,n)∈ S, and b. convolving the discriminating function D_(α)(y,n) with a pre-set parity function which uses α as a scaling coefficient; analyzing the measure ρ(α) and defining a de-interlacing quality measure Q that is inversely proportional to visibility of peak(s) in μ(α) as a function of α; analyzing the measure ρ(α) and defining the most probable vertical scaling ratio β as α corresponding to the maximum of ρ(α); and defining the positions corresponding to original lines in the scaled content as maxima of cos(π(βy+n)+φ(β).
 10. The method of claim 9 wherein evaluating further comprises evaluating pre-set discriminating function D_(α)(y,n) for given set of lines (y,n)∈ S where discriminating function D_(α)(y,n) is based on local spatial and/or temporal pixel correlations.
 11. The method of claim 9, wherein where the pre-set discriminating function D(y,n) is based on a weighted sum of different specific discriminating functions.
 12. The method of claim 9 where de-interlacing quality measure Q is computed as function of variance and the maximum of the scaling spectrum.
 13. The method of claim 10 wherein convolving further comprises convolving the evaluated discriminating function D_(α)(y,n) with pre-set parity function exp(−iπ(α·y+n)) where α is a scaling coefficient, y is a line number, and n is a frame number to determine the measure ρ(α) ${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {{- }\; {\pi \left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$ and phase ${\phi (\alpha)} = {{\arg\left( {{S}^{- 1}{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}} \right)}.}$
 14. The method of claim 9 wherein convolving further comprises convolving the evaluated discriminating function D_(α)(y,n) with pre-set parity function exp(−iπ(α·y+n)) where α is a scaling coefficient, y is a line number, and n is a frame number to determine the measure ρ(α) ${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {{- }\; {\pi \left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$ and phase ${\phi (\alpha)} = {{\arg\left( {{S}^{- 1}{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}} \right)}.}$
 15. The method of claim 16, wherein where the pre-set discriminating function D(y,n) is based on a weighted sum of different specific discriminating functions.
 16. The method of claim 15 wherein the pre-set discriminating function D(y,n) further comprises at least one of specific discriminating function proportional to a relative/additional amount of high frequency detail in the given line n with respect to a specific neighboring line in an analyzed previous or next frame.
 17. An apparatus for detection of de-interlacing for scaled video having a vertical scaling factor α, comprising: a de-interlacing artifact visibility detection module comprising sub modules: a. a discrimination function module that performs a pre-set discriminating function D_(α)(y,n) on a subset of the set of lines (y,n)∈ S where n is a specific frame number and y is a line number within the specified frame, and b. a convolving discriminating function module that convolves the discriminating function D_(α)(y,n) using a pre-set parity function which uses α as a scaling coefficient to obtain ρ(α) which indicates the visibility of de-interlacing artifacts; a de-interlacing quality definition and analysis module that analyzes the measure ρ(α) and defines a de-interlacing quality measure Q that is inversely proportional to visibility of peak(s) in ρ(α) as a function of α, defines the most probable vertical scaling ration β as α corresponding to the maximum of ρ(α) and defines the positions corresponding to original lines in the scaled content as maxima of cos(π(βy+n)+φ(β)).
 18. The apparatus of claim 17 wherein evaluating further comprises evaluating pre-set discriminating function D_(α)(y,n) for given set of lines (y,n)∈ S where discriminating function D_(α)(y,n) is based on local spatial and/or temporal pixel correlations.
 19. The apparatus of claim 17, wherein where the pre-set discriminating function D(y,n) is based on a weighted sum of different specific discriminating functions.
 20. The apparatus of claim 17 where de-interlacing quality measure Q is computed as function of variance and the maximum of the scaling spectrum.
 21. The apparatus of claim 17 wherein convolving further comprises convolving the evaluated discriminating function D_(α)(y,n) with pre-set parity function exp(−iπ(α·y+n)) where α is a scaling coefficient, y is a line number, and n is a frame number to determine the measure ρ(α) ${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {{- }\; {\pi \left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$ and phase ${\phi (\alpha)} = {{\arg\left( {{S}^{- 1}{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}} \right)}.}$
 22. The method of claim 17 wherein convolving further comprises convolving the evaluated discriminating function D_(α)(y,n) with pre-set parity function exp(−iπ(α·y+n)) where α is a scaling coefficient, y is a line number, and n is a frame number to determine the measure ρ(α) ${{\rho (\alpha)} = {{S}^{- 1}{{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {{- }\; {\pi \left( {{\alpha \cdot y} + n} \right)}} \right)}}}}}},$ and phase ${\phi (\alpha)} = {{\arg\left( {{S}^{- 1}{\sum\limits_{{({y,n})} \in S}{{D_{\alpha}\left( {y,n} \right)} \cdot {\exp \left( {- {{\pi}\left( {{\alpha \cdot y} + n} \right)}} \right)}}}} \right)}.}$
 23. The apparatus of claim 22 wherein the pre-set discriminating function D(y,n) further comprises at least one of specific discriminating function proportional to a relative/additional amount of high frequency detail in the given line n with respect to a specific neighboring line in an analyzed previous or next frame.
 24. A system for compression/transmission/storage of a video signal where an optimal compression/transmission/storage strategy is determined based on a value of a de-interlacing quality measure Q computed using an included DISC detector apparatus configured in accordance with claim 5, comprising: a front-end module to receive and de-interlaced an interlaced video or receive a progressive signal; a DISC detector apparatus configured in accordance with claim 5 to compute and output a quality measure Q of the de-interlacing and to determine and classify even and odd grids wherein one of said even and odd grid is a grid of original lines of the input video signal; a video engine to reconstruct, store in long term storage, and output to a screen the original video stream from the even and odd grids and the quality measure Q ;and a display to receive and display the reconstructed video stream.
 25. A system for enhancement of an input video signal where the strength of enhancement depends on a de-interlacing quality measure Q and at least one of position and proximity of the original lines both computed by an included DISC detector apparatus; A DISC detector apparatus configured in accordance with claim 5 to compute and output a quality measure Q of the de-interlacing and classify even and odd grids wherein one of said even and odd grid is a grid of original lines of the input video signal and to determine position/proximity of original lines; a video engine to reconstruct and output the original video stream from lines of at least one of the even and odd grids, at least one of position and proximity of said lines in said grids and the quality measure Q; and a display to receive and display the reconstructed video stream.
 26. A system for motion detection in an input video signal where thresholds and parameters are set depending on a de-interlacing quality measure Q computed by an included DISC detector apparatus; a DISC detector apparatus configured in accordance with claim 5 to compute and output a quality measure Q of the de-interlacing and classify even and odd grids wherein one of said even and odd grid is a grid of original lines of the input video signal and to determine position/proximity of original lines; a video engine to reconstruct and output the original video stream from at least one of the even and odd grids, the position/proximity thereof and the quality measure Q; and a display to receive and display the reconstructed video stream. 